/**
 * @Project Name:spailler
 * @Package Name:cn.hoofungson.spailler.web.controller.user
 * @Since JDK 1.8
 */
package cn.hoofungson.spailler.web.controller.user;

import cn.hoofungson.spailler.web.model.vo.user.UserVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * @Description: 用户控制器
 * @Author 胡松 hoofungson@163.com
 * @Date 2018-08-31 15:45
 * @Version V1.0
 */
@RestController
@RequestMapping(value = "/rest/api/user")
public class UserController {

    @GetMapping
    public List<UserVO> list(){
        List<UserVO> userVOList = new ArrayList<>();
        UserVO userVO = new UserVO();
        userVO.setId(Math.abs(new Random().nextLong()));
        userVO.setUsername("hoosung");
        userVO.setPassword("123****456");
        userVO.setNickName("hoofungson");
        userVO.setRealName("胡松");
        userVO.setAddress("四川.平昌");
        userVO.setEmail("hoofungson@163.com");
        userVOList.add(userVO);
        return userVOList;
    }
}
